package org.jsola.hr.vo.excel;

import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.jsola.common.DateKit;
import org.jsola.core.vo.BaseVO;
import org.jsola.hr.constant.convert.*;

import java.util.Date;

/**
 * 【华杰员工信息】excel导出对象
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class HjEmpInfoExportVO extends BaseVO {

    private static final long serialVersionUID = 1L;


    @ExcelProperty(value = "姓名")
    private String name;

    @ExcelProperty(value = "手机号")
    private String phone;

    @ExcelProperty(value = "个人邮箱")
    private String email;

    @ExcelProperty(value = "部门")
    private String depName;

    @ExcelProperty(value = "岗位")
    private String positionName;

    @ExcelProperty(value = "工作地点")
    private String workCity;

    @ExcelProperty(value = "入职时间Date")
    private Date joinDate;

    @ExcelProperty(value = "入职时间")
    private String joinDateStr;

    @ExcelProperty(value = "岗位类型", converter = PostTypeConverter.class)
    private Integer postType;

    @ExcelProperty(value = "试用期天数")
    private Integer probationDays;

    @ExcelProperty(value = "转正时间Date")
    private Date turnStraightDate;

    @ExcelProperty(value = "转正时间")
    private String turnStraightDateStr;

    @ExcelProperty(value = "身份证号")
    private String idCard;

    @ExcelProperty(value = "出生日期Date")
    private Date birthday;

    @ExcelProperty(value = "出生日期")
    private String birthdayStr;

    @ExcelProperty(value = "性别", converter = GenderEnumConverter.class)
    private Integer gender;

    @ExcelProperty(value = "民族")
    private String nation;

    @ExcelProperty(value = "户籍所在地")
    private String nativeLocation;

    @ExcelProperty(value = "婚姻状况", converter = EmpMaritalStatusConverter.class)
    private Integer maritalStatus;

    @ExcelProperty(value = "参加工作时间Date")
    private Date joinWorkDate;

    @ExcelProperty(value = "参加工作时间")
    private String joinWorkDateStr;

    @ExcelProperty(value = "户口类型", converter = RegTypeEnumConverter.class)
    private Integer regType;

    @ExcelProperty(value = "现居住地址（详情）")
    private String currentLocation;

    @ExcelProperty(value = "政治面貌", converter = EmpPoliticalStatusConverter.class)
    private Integer politicalStatus;

    @ExcelProperty(value = "最高学历")
    private String highestEducation;

    @ExcelProperty(value = "入职城市")
    private String joinCityName;

    @ExcelProperty(value = "合同类型")
    private String contractType;

    @ExcelProperty(value = "合同开始时间Date")
    private Date contractStartTime;

    @ExcelProperty(value = "合同开始时间")
    private String contractStartTimeStr;

    @ExcelProperty(value = "合同结束时间Date")
    private Date contractEndTime;

    @ExcelProperty(value = "合同结束时间")
    private String contractEndTimeStr;

    @ExcelProperty(value = "合同期限(年)")
    private String contractTermYear;

    @ExcelProperty(value = "工资卡开户行")
    private String bankName;

    @ExcelProperty(value = "工资卡银行卡号")
    private String bankCard;

    @ExcelProperty(value = "工资卡开户支行")
    private String bankCardBranch;

    public String getJoinDateStr() {
        return DateKit.getDateStr(this.joinDate);
    }

    public String getTurnStraightDateStr() {
        return DateKit.getDateStr(this.turnStraightDate);
    }

    public String getBirthdayStr() {
        return DateKit.getDateStr(this.birthday);
    }

    public String getJoinWorkDateStr() {
        return DateKit.getDateStr(this.joinWorkDate);
    }

    public String getContractStartTimeStr() {
        return DateKit.getDateStr(this.contractStartTime);
    }

    public String getContractEndTimeStr() {
        return DateKit.getDateStr(this.contractEndTime);
    }
}

